package com.jvyou.ognl;

import java.util.Arrays;
import java.util.List;

/**
 * @author 橘柚
 * @version 1.0-SNAPSHOT
 * @Date 2024/5/25 14:34
 * @Description
 */
public class User {

    private String name;
    private int age;
    private String address;
    private String email;
    private String phone;

    private boolean isMarried;

    private String[] hobbies;

    private List<String> foods;

    public static String className = "com.jvyou.ognl.User";

    public User() {
    }

    public User(String name, int i, String address, String email) {
        this.name =name;
        this.age = i;
        this.address = address;
        this.email = email;
    }


    public static String qualifiedName() {
        System.out.println("User.qualifiedName():" + User.class.getName());
        return User.class.getName();
    }

    public static String qualifiedName(String name) {
        System.out.println("User.qualifiedName():" + name);
        return name;
    }

    public void printName() {
        System.out.println("name = " + name);
    }

    public void printName(String name) {
        System.out.println("name = " + name);
    }

    public void printName(String name, int age) {
        System.out.println("name = " + name);
        System.out.println("age = " + age);
    }

    public List<String> getFoods() {
        return foods;
    }

    public void setFoods(List<String> foods) {
        this.foods = foods;
    }

    public boolean isMarried() {
        return isMarried;
    }

    public void setMarried(boolean married) {
        isMarried = married;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String[] getHobbies() {
        return hobbies;
    }

    public void setHobbies(String[] hobbies) {
        this.hobbies = hobbies;
    }

    public static String getClassName() {
        return className;
    }

    public static void setClassName(String className) {
        User.className = className;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", address='" + address + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", isMarried=" + isMarried +
                ", hobbies=" + Arrays.toString(hobbies) +
                ", foods=" + foods +
                '}';
    }
}
